const mdbs = require('./mongodbs')
const router = require('../router/router')
aabb()
function test11(){
    const jsons = {   
        attach: '沈阳众志成',
        bank_type: 'CFT',
        cash_fee: '1',
        fee_type: 'CNY',
        is_subscribe: 'Y',
        mch_id: '1321518401',
        nonce_str: 'x1m1ijbekmc',
        openid: 'oGMPQs1rYjdPoGGcIdHE3C8-G4yE',
        out_trade_no: 'ifoocdpdmm57',
        result_code: 'SUCCESS',
        return_code: 'SUCCESS',
        sign: '81274FF02EB1ACBAB5265E6CBDCFF0FE',
        time_end: '20180628092658',
        total_fee: '1',
        trade_type: 'JSAPI',
        transaction_id: '4200000113201806281506817415' 
    }

    mdbs.insertOne('ceshi',jsons,function(err,result){
        if(err){
            console.log('操作失败'+err)
        }else{
            console.log('操作成功'+result)
        }
    })
}

function aabb(){
    let searchJson = {
        'transaction_id':'4200000114201806280289643350'
    } 
    mdbs.finded('wxpay_list_tables',searchJson,function(err,result){
        console.log(result)
    })

}

